import { useState } from 'react';
import DarkBtn from '../../../../../../common/DarkBtn';
import { EnvironmentOutlined } from '@ant-design/icons';
import FloodAnalysisModal from './FloodAnalysisModal';

export default function FloodAnalysis() {
    const [isModalVisible, setIsModalVisible] = useState(false);

    const handleClick = () => {
        setIsModalVisible(true);
    };

    const handleClose = () => {
        setIsModalVisible(false);
    };

    return (
        <>
            <DarkBtn 
                icon={<EnvironmentOutlined />} 
                title="洪水淹没分析" 
                onClick={handleClick}
            />
            <FloodAnalysisModal
                visible={isModalVisible} 
                onClose={handleClose} 
            />
        </>
    );
} 